import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/pages/Login'
import Home from '@/pages/Home'
import Users from '@/pages/Users'
import Roles from '@/pages/Roles'
import Power from '@/pages/Power'
import Good from '@/pages/Good'
import Goodadd from '@/pages/Goodadd'
import Param from '@/pages/Param'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/Home',
      name: 'Home',
      component: Home,
      children: [
        {
          path: '/Users',
          name: 'Users',
          component: Users
        },
        {
          path: '/Roles',
          name: 'Roles',
          component: Roles
        },
        {
          path: '/Power',
          name: 'Power',
          component: Power
        },
        {
          path: '/Good',
          name: 'Good',
          component: Good
        },
        {
          path: '/Goodadd',
          name: 'Goodadd',
          component: Goodadd
        },
        {
          path: '/Param',
          name: 'Param',
          component: Param
        }
      ]
    },
    {
      path: "*", redirect: "/"
    }
  ],
  mode: 'history'
})
